if ( typeof(controlElement.length) == "number" )
{
	controlElement = controlElement[0];
}

//var g_categoryItemCount 
//  = dynXmlDocument.selectSingleNode("/my:CategoryIndexT/@ItemCount");

var argListDoc = GetTransformArgumentList(controlElement.id);
var pagingNode = argListDoc.selectSingleNode("//Paging");
var pageIndexNode = pagingNode.selectSingleNode("PageIndex");
var pageSizeNode = pagingNode.selectSingleNode("PageSize");
var pageCountNode = pagingNode.selectSingleNode("PageCount");

if (typeof(g_categoryItemCount) != "undefined")
{
	var documentSource = strStItem + "/STORE_CATEGORY/"
		+ ((g_categoryVisualLevel=="H")?"HUB/":g_categoryVisualLevel+"CODE/")
		 + argListDoc.selectSingleNode("//Params/Kind").text
		+ "/"+ controlElement.sort
		 + "/DATA_" + g_categoryID + "_" +(Math.floor(parseInt(pageIndexNode.text)/10)+1) + ".XML";
		 
	document.write("<!--product file path:"+documentSource+"-->");	 

	var xmlDocument = new ActiveXObject( "Msxml2.DOMDocument.3.0" );
	xmlDocument.async = false;
	xmlDocument.load( documentSource );
	xmlDocument.setProperty("SelectionNamespaces", 
	'xmlns:my="http://schema.auction.co.kr/Arche.Stores.xsd" ');


	pageCountNode.text =  parseInt((Number(g_categoryItemCount) + Number(pageSizeNode.text) -1) /pageSizeNode.text);
	
	var startPageIndexNode = pagingNode.selectSingleNode("StartPageIndex");
	var startDataIndexNode = pagingNode.selectSingleNode("StartDataIndex");
	
	startPageIndexNode.text = Math.floor(parseInt(pageIndexNode.text)/10) * 10 +1;
	startDataIndexNode.text = Math.floor(parseInt(pageIndexNode.text)/10) * 500;

	controlElement.xmlDocument = xmlDocument;
}
else
{
	pageCountNode.text = "0";
}


